import request from '../common/request.js'

export const findByUserId = (data) => {
	 return request({
	        url: `enterprise/findByUserId/${data.id}`,
	        method: 'get'
	})
}
export const findByUserBan = (data) => {
	 return request({
	        url: `enterprise/findByUserBan/${data.id}`,
	        method: 'get'
	})
}
export const findByUserExamine = (data) => {
	 return request({
	        url: `enterprise/findByUserExamine/${data.id}`,
	        method: 'get'
	})
}
export const findByUserExamineFailed = (data) => {
	 return request({
	        url: `enterprise/findByUserExamineFailed/${data.id}`,
	        method: 'get'
	})
}
export const findById = (data) => {
	 return request({
	        url: `enterprise/findById/${data.id}`,
	        method: 'get'
	})
}
export const findAllNature = (data) => {
	 return request({
	        url: `nature/findAll`,
	        method: 'get'
	})
}
//删除企业图片
export const delPhoto = (data) => {
	 return request({
	        url: `enPhoto/del/${data.enterpriseId}/${data.photoId}`,
	        method: 'delete'
	})
}
//更新企业信息
export const updateEnterprise = (data) => {
	 return request({
	        url: `enterprise/updateById`,
	        method: 'put',
			data
	})
}

export const saveEnterprise = (data) => {
	 return request({
	        url: `enterprise/save`,
	        method: 'post',
			data
	})
}
export const delEnterprise = (data) => {
	 return request({
	        url: `enterprise/del/${data.id}`,
	        method: 'delete',
	})
}
//查询所有福利

export const findAllWelfare = (data) => {
	 return request({
	        url: `welfare/findAll`,
	        method: 'get',
	})
}
//occupation
export const findAlloccupation = (data) => {
	 return request({
	        url: `occupation`,
	        method: 'get',
	})
}

export const saveOrUpdateInfo = (data) => {
	 return request({
	        url: `recruitmentInfo/saveOrUpdate`,
	        method: 'post',
			data
	})
}
export const delInfo = (data) => {
	 return request({
	        url: `recruitmentInfo/del/${data.id}`,
	        method: 'delete',
	})
}

export const getCandidatesById = (data) => {
	 return request({
	        url: `candidates/${data.id}`,
	        method: 'get',
	})
}
export const updateCandidate = (data) => {
	 return request({
	        url: `candidates`,
	        method: 'put',
			data
	})
}

